﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="CRM.Web.UserManage.List" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="<%= base.ResourcesPath + "Style/main.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/button.css" %>" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/jquery-1.6.2.min.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/My97DatePicker/WdatePicker.js"  defer="defer" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/MaskTextBox.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/Common.js"></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/button.js"></script>
    <script type="text/javascript" >
        $(document).ready(function() {
            $('.contentAuthority').bind("click", function() {
                var userID = $(this).attr('title');
                var url = '../ContentAuthorityManage/Modify.aspx?USERID=' + userID;
                var title = 'ContentAuthorityManage';
                openModalDialog(url, title, 800, 600);
                return false;
            });
            $('.setSeatID').bind("click", function() {
                var userID = $(this).attr('title');
                var url = 'SetSeatID.aspx?USERID=' + userID;
                var title = 'SetSeatID';
                openModalDialog(url, title, 320, 180);
                return false;
            });
        });
        
    </script>
</head>
<body>
    <form id="form1" runat="server"  defaultbutton="btnSearch" >
<table border="0" cellpadding="0" cellspacing="0" id="tTitle">
    <tr>
	<td class="left">
	    <img src="<%= base.ResourcesPath %>Images/title_left.gif" alt="" />
	</td>
	<td class="middle">

    <div class="pagetitle">
        <div><asp:Label ID="lblTitle" runat="server" Text="用户列表" ></asp:Label></div>
    </div>
	
	</td>
	<td class="right">
	    <img src="<%= base.ResourcesPath %>Images/title_right.gif" alt="" />
	</td>
    </tr>
</table>
    <div id="divMain" >
<div style="width: 100%; display: none;">
	<table border="0" cellpadding="0" cellspacing="0" class="search"  align="center">
		<tr>
			<td class="title" >用户编号:</td>
			<td class="content"><asp:TextBox ID="txtUSERID" runat="server"  CssClass="txt" MaxLength="8"  Rows="3" TextMode="SingleLine" ></asp:TextBox></td>
		</tr>
		<tr>
		</tr>
		<tr>
		</tr>
		<tr>
			<td class="title" >密码:</td>
			<td class="content"><asp:TextBox ID="txtPASSWORD" runat="server"  CssClass="txt" MaxLength="32"  Rows="3" TextMode="SingleLine" ></asp:TextBox></td>
		</tr>
		<tr>
			<td class="title" >性别:</td>
			<td class="content"><asp:TextBox ID="txtGENDER" runat="server"  CssClass="txt" MaxLength="8"  Rows="3" TextMode="SingleLine" ></asp:TextBox></td>
		</tr>
		<tr>
			<td class="title" >部门编号:</td>
			<td class="content"><asp:DropDownList ID="ddlDEPARTMENTID" runat="server" CssClass="ddl"></asp:DropDownList></td>
		</tr>
		<tr>
		</tr>
		<tr>
			<td class="title" >角色编号:</td>
			<td class="content"><asp:DropDownList ID="ddlROLEID" runat="server" CssClass="ddl"></asp:DropDownList></td>
		</tr>
		<tr>
		</tr>
		<tr>
			<td class="title" >登录次数:</td>
			<td class="content"><asp:TextBox ID="txtLOGINCOUNT" runat="server"  CssClass="txt" MaxLength="8"  Rows="3" TextMode="SingleLine" ></asp:TextBox></td>
		</tr>
		<tr>
			<td class="title" >最后登录时间:</td>
			<td class="content"><asp:TextBox ID="txtLASTLOGINTIMEBegin" runat="server"  MaxLength="20" CssClass="datetime" ></asp:TextBox>-<asp:TextBox ID="txtLASTLOGINTIMEEnd" runat="server"  MaxLength="20" CssClass="datetime" ></asp:TextBox></td>	
		</tr>
		<tr>
		</tr>
		<tr>
			<td class="title" >生日:</td>
			<td class="content"><asp:TextBox ID="txtBIRTHDATEBegin" runat="server"  MaxLength="20" CssClass="datetime" ></asp:TextBox>-<asp:TextBox ID="txtBIRTHDATEEnd" runat="server"  MaxLength="20" CssClass="datetime" ></asp:TextBox></td>	
		</tr>
		<tr>
			<td class="title" >座席编号:</td>
			<td class="content"><asp:DropDownList ID="ddlSEATID" runat="server" CssClass="ddl"></asp:DropDownList></td>
		</tr>
		<tr>
			<td class="title" >密码最后修改时间:</td>
			<td class="content"><asp:TextBox ID="txtPWDLASTMODIFYTIMEBegin" runat="server"  MaxLength="20" CssClass="datetime" ></asp:TextBox>-<asp:TextBox ID="txtPWDLASTMODIFYTIMEEnd" runat="server"  MaxLength="20" CssClass="datetime" ></asp:TextBox></td>	
		</tr>
		<tr>
			<td class="title" >是否已锁:</td>
			<td class="content"><asp:TextBox ID="txtLOCKED" runat="server"  CssClass="txt" MaxLength="8"  Rows="3" TextMode="SingleLine" ></asp:TextBox></td>
		</tr>
		<tr>
			<td class="title" >密码是否重置:</td>
			<td class="content"><asp:TextBox ID="txtPWDRESET" runat="server"  CssClass="txt" MaxLength="8"  Rows="3" TextMode="SingleLine" ></asp:TextBox></td>
		</tr>
		<tr>
		</tr>
		<tr>
		</tr>
		<tr>
			<td class="title" >邮件地址:</td>
			<td class="content"><asp:TextBox ID="txtEMAIL" runat="server"  CssClass="txt" MaxLength="128"  Rows="3" TextMode="SingleLine" ></asp:TextBox></td>
		</tr>
		<tr>
			<td class="title" >网址:</td>
			<td class="content"><asp:TextBox ID="txtURL" runat="server"  CssClass="txt" MaxLength="256"  Rows="3" TextMode="SingleLine" ></asp:TextBox></td>
		</tr>
		<tr>
			<td class="title" >QQ:</td>
			<td class="content"><asp:TextBox ID="txtQQ" runat="server"  CssClass="txt" MaxLength="10"  Rows="3" TextMode="SingleLine" ></asp:TextBox></td>
		</tr>
		<tr>
			<td class="title" >MSN:</td>
			<td class="content"><asp:TextBox ID="txtMSN" runat="server"  CssClass="txt" MaxLength="64"  Rows="3" TextMode="SingleLine" ></asp:TextBox></td>
		</tr>
		<tr>
		</tr>
		<tr>
			<td class="title" >创建时间:</td>
			<td class="content"><asp:TextBox ID="txtCREATETIMEBegin" runat="server"  MaxLength="20" CssClass="datetime" ></asp:TextBox>-<asp:TextBox ID="txtCREATETIMEEnd" runat="server"  MaxLength="20" CssClass="datetime" ></asp:TextBox></td>	
		</tr>
		<tr>
			<td class="title" >创建人编号:</td>
			<td class="content"><asp:DropDownList ID="ddlCREATEPEOPLEID" runat="server" CssClass="ddl"></asp:DropDownList></td>
		</tr>
		<tr>
			<td class="title" >创建人:</td>
			<td class="content"><asp:TextBox ID="txtCREATEPEOPLE" runat="server"  CssClass="txt" MaxLength="32"  Rows="3" TextMode="SingleLine" ></asp:TextBox></td>
		</tr>
		<tr>
			<td class="title" >最后修改人编号:</td>
			<td class="content"><asp:DropDownList ID="ddlLASTMODIFYPEOPLEID" runat="server" CssClass="ddl"></asp:DropDownList></td>
		</tr>
		<tr>
			<td class="title" >最后修改人:</td>
			<td class="content"><asp:TextBox ID="txtLASTMODIFYPEOPLE" runat="server"  CssClass="txt" MaxLength="32"  Rows="3" TextMode="SingleLine" ></asp:TextBox></td>
		</tr>
		<tr>
			<td class="title" >最后修改时间:</td>
			<td class="content"><asp:TextBox ID="txtLASTMODIFYTIMEBegin" runat="server"  MaxLength="20" CssClass="datetime" ></asp:TextBox>-<asp:TextBox ID="txtLASTMODIFYTIMEEnd" runat="server"  MaxLength="20" CssClass="datetime" ></asp:TextBox></td>	
		</tr>
		<tr>
			<td class="title" >备注:</td>
			<td class="content"><asp:TextBox ID="txtREMARK" runat="server"  CssClass="txt" MaxLength="128"  Rows="3" TextMode="SingleLine" ></asp:TextBox></td>
		</tr>
		<tr>
		</tr>
	</table>
</div>
<div style="width: 100%">
    <div class="listdiv">
        <table border="0" cellpadding="0" cellspacing="0" class="search" align="center">
            <tr>
                <td class="title"><div  class="nowrap">
                    用户姓名:</div>
                </td>
                <td class="content">
                    <asp:TextBox ID="txtUSERNAME" runat="server" CssClass="txt"></asp:TextBox>
                </td>
                <td class="title"><div  class="nowrap">
                    登录名:</div>
                </td>
                <td class="content">
                    <asp:TextBox ID="txtLOGINNAME" runat="server" CssClass="txt"></asp:TextBox>
                </td>
                <td class="title"><div  class="nowrap">
                    部门名称:</div>
                </td>
                <td class="content">
                    <asp:TextBox ID="txtDEPARTMENTNAME" runat="server" CssClass="txt"></asp:TextBox>
                </td>
                <td class="title"><div  class="nowrap">
                    状态:</div>
                </td>
                <td class="content">
                    <asp:DropDownList ID="ddlSTATUS" runat="server" CssClass="ddl">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="title"><div  class="nowrap">
                    手机:</div>
                </td>
                <td class="content">
                    <asp:TextBox ID="txtMOBILEPHONE" runat="server" CssClass="txt"></asp:TextBox>
                </td>
                <td class="title"><div  class="nowrap">
                    家庭电话:</div>
                </td>
                <td class="content">
                    <asp:TextBox ID="txtHOMEPHONE" runat="server" CssClass="txt"></asp:TextBox>
                </td>
                <td class="title"><div  class="nowrap">
                    分机号:</div>
                </td>
                <td class="content">
                    <asp:TextBox ID="txtEXT" runat="server" CssClass="txt"></asp:TextBox>
                </td>
                <td class="title">
                    角色名称:
                </td>
                <td class="content">
                    <asp:TextBox ID="txtROLENAME" runat="server" CssClass="txt" MaxLength="32" Rows="3"
                        TextMode="SingleLine"></asp:TextBox>
                </td>
            </tr>
                <tr> 
                    <td class="title">
                        <div  class="nowrap">
                            导出记录:</div>
                    </td>
                    <td class="content">
                        <div style="white-space: nowrap;">                            
                            <asp:TextBox ID="txtRecordBegin" runat="server" MaxLength="20" CssClass="small"></asp:TextBox>-<asp:TextBox
                                ID="txtRecordEnd" runat="server" MaxLength="20" CssClass="small"></asp:TextBox>（条）
                        </div>
                    </td>
                    <td class="title">
                        <div  class="nowrap">
                            单次导出数:</div>
                    </td>
                    <td class="content">
                        <div style="white-space: nowrap;">    
                            <asp:Label ID="lblExportMaxRows" runat="server" ></asp:Label>                        
                        </div>
                    </td>
                    <td class="title">
                        <div  class="nowrap">
                            </div>
                    </td>
                    <td class="content">
                        <div style="white-space: nowrap;">                            
                        </div>
                    </td>
                    <td class="title">
                        &nbsp;
                    </td>
                    <td class="content">
                        <div style="width: 200px;" class="nowrap">                            
                            <asp:Button ID="btnSearch" runat="server" Text="查 询" CommandName="Search" CssClass="btn title_cx"
                        OnClick="btnSearch_Click" />
                            <asp:Button ID="btnExportExcel" runat="server" Text="导 出" CommandName="Export" CssClass="btn title_cx"
                                OnClick="btnExportExcel_Click" />
                        </div>
                    </td>
                </tr>
		</table>    
        <dp:WebGridView ID="gvList" runat="server" CssClass="gridview" 
            AutoGenerateColumns="False" OnRowCreated="gvList_RowCreated" 
            OnRowDataBound="gvList_RowDataBound" OnRowDeleting="gvList_RowDeleting" AllowPaging="True" 
            AllowSorting="True" Width="100%" SortExpressionValue="USERID" 
            onrowcommand="gvList_RowCommand">
            <Columns>
			    <asp:TemplateField HeaderText="用户编号" SortExpression="USERID">
                    <ItemTemplate>
                        <asp:HyperLink id="hlModifyUSERID" runat="server" NavigateUrl='<%# Eval("USERID", ModifyUrl) %>' Text='<%# Bind("USERID") %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="用户姓名" SortExpression="USERNAME">
                    <ItemTemplate>
                        <asp:HyperLink id="hlModifyUSERNAME" runat="server" NavigateUrl='<%# Eval("USERID", ModifyUrl) %>' Text='<%# Bind("USERNAME") %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
			<asp:BoundField DataField="LOGINNAME" HeaderText="登录名"  
                    SortExpression="LOGINNAME" />
			<asp:BoundField DataField="PASSWORD" HeaderText="密码"  SortExpression="PASSWORD" Visible="false" />
			<asp:BoundField DataField="GENDER" HeaderText="性别"  SortExpression="GENDER" Visible="false" />
			<asp:BoundField DataField="DEPARTMENTID" HeaderText="部门编号"  SortExpression="DEPARTMENTID" Visible="false"/>
			<asp:BoundField DataField="DEPARTMENTNAME" HeaderText="部门名称"  SortExpression="DEPARTMENTNAME" />
			<asp:BoundField DataField="ROLEID" HeaderText="角色编号"  SortExpression="ROLEID" Visible="false"/>
			<asp:BoundField DataField="ROLENAME" HeaderText="角色名称"  SortExpression="ROLENAME" />
			<asp:BoundField DataField="LOGINCOUNT" HeaderText="登录次数"  SortExpression="LOGINCOUNT" />
			<asp:BoundField DataField="LASTLOGINTIME" HeaderText="最后登录时间"  SortExpression="LASTLOGINTIME" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" />
			<asp:BoundField DataField="STATUS" HeaderText="状态"  SortExpression="STATUS" Visible="false" />
			<asp:BoundField DataField="BIRTHDATE" HeaderText="生日"  SortExpression="BIRTHDATE" DataFormatString="{0:yyyy-MM-dd}" Visible="false" />
			<asp:BoundField DataField="PWDLASTMODIFYTIME" HeaderText="密码最后修改时间"  SortExpression="PWDLASTMODIFYTIME" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" Visible="false"/>
			<asp:BoundField DataField="LOCKED" HeaderText="是否已锁"  SortExpression="LOCKED" Visible="false" />
			<asp:BoundField DataField="PWDRESET" HeaderText="密码是否重置"  SortExpression="PWDRESET" Visible="false"/>
			<asp:BoundField DataField="MOBILEPHONE" HeaderText="手机"  SortExpression="MOBILEPHONE" Visible="false" />
			<asp:BoundField DataField="HOMEPHONE" HeaderText="家庭电话"  SortExpression="HOMEPHONE" Visible="false" />
			<asp:BoundField DataField="EMAIL" HeaderText="邮件地址"  SortExpression="EMAIL"  Visible="false"/>
			<asp:BoundField DataField="URL" HeaderText="网址"  SortExpression="URL"  Visible="false"/>
			<asp:BoundField DataField="QQ" HeaderText="QQ"  SortExpression="QQ" Visible="false"  />
			<asp:BoundField DataField="MSN" HeaderText="MSN"  SortExpression="MSN" Visible="false"  />
			<asp:BoundField DataField="EXT" HeaderText="分机号"  SortExpression="EXT"  Visible="false"/>
			<asp:BoundField DataField="CREATEPEOPLEID" HeaderText="创建人编号"  SortExpression="CREATEPEOPLEID"  Visible="false"/>
			<asp:BoundField DataField="CREATEPEOPLE" HeaderText="创建人"  SortExpression="CREATEPEOPLE"  Visible="false" />
			<asp:BoundField DataField="CREATETIME" HeaderText="创建时间"  SortExpression="CREATETIME" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}"  Visible="false"/>
			<asp:BoundField DataField="LASTMODIFYPEOPLEID" HeaderText="最后修改人编号"  SortExpression="LASTMODIFYPEOPLEID"  Visible="false"/>
			<asp:BoundField DataField="LASTMODIFYPEOPLE" HeaderText="最后修改人"  SortExpression="LASTMODIFYPEOPLE"  Visible="false"/>
			<asp:BoundField DataField="LASTMODIFYTIME" HeaderText="最后修改时间"  SortExpression="LASTMODIFYTIME" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}"  Visible="false" />
			<asp:BoundField DataField="REMARK" HeaderText="备注"  SortExpression="REMARK" Visible="false"/>
			<asp:BoundField DataField="ISSYSTEMADMIN" HeaderText="系统管理员"  SortExpression="ISSYSTEMADMIN" Visible="false"/>
			<asp:BoundField DataField="SEATID" HeaderText="座席号"  SortExpression="SEATID" />
			<asp:TemplateField HeaderText="操作" ShowHeader="False">
                <itemtemplate>
                <div style="white-space: nowrap;">
                <asp:LinkButton id="lbtnContentAuthority" runat="server" Text="内容权限" CommandName="ContentAuthority" CssClass="contentAuthority" ToolTip='<%# Eval("USERID") %>'></asp:LinkButton>
                <asp:LinkButton ID="lbtnSetSeatID" runat="server" CommandName="SetSeatID" Text="座席设置" CssClass="setSeatID" ToolTip='<%# Eval("USERID") %>'></asp:LinkButton> 
                <asp:LinkButton ID="lblResetPWD" runat="server" CommandName="ResetPWD" Text="重置密码" CssClass="resetPWD" ToolTip='<%# Eval("USERID") %>' CommandArgument='<%# Eval("USERID") %>' CausesValidation="False" OnClientClick="return confirm('您确认要重置此用户密码吗？');"></asp:LinkButton> 
                <asp:LinkButton ID="lblDisable" runat="server" CommandName="Disable" Text="禁用" CssClass="resetPWD" ToolTip='<%# Eval("USERID") %>' CommandArgument='<%# Eval("USERID") %>' CausesValidation="False" OnClientClick="return confirm('您确认要禁用此用户密码吗？');"></asp:LinkButton> 
                <asp:LinkButton ID="lblEnable" runat="server" CommandName="Enable" Text="启用" CssClass="resetPWD" ToolTip='<%# Eval("USERID") %>' CommandArgument='<%# Eval("USERID") %>' CausesValidation="False" OnClientClick="return confirm('您确认要启用此用户密码吗？');"></asp:LinkButton> 
                
                <asp:HyperLink id="hlModify" runat="server" NavigateUrl='<%# Eval("USERID", ModifyUrl) %>'>详细</asp:HyperLink>
                <asp:LinkButton id="lbtnDelete" runat="server" Text="删除" CommandName="Delete" CausesValidation="False" OnClientClick="return confirm('您确认要删除此条记录吗？');"></asp:LinkButton>            
                </div>
				</itemtemplate>
            </asp:TemplateField>
            </Columns>	
            <RowStyle CssClass="row" />
            <AlternatingRowStyle CssClass="row2" />
            <HeaderStyle CssClass="header" />	
            <PagerStyle CssClass="pager" />	
        </dp:WebGridView>
    </div>
</div>
</div>
    </form>
</body>
</html>
